<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面向对象的tab选项卡</title>
    <link rel="stylesheet" href="./tab.css">
</head>
<body>
    <!-- tab选项卡1 -->
    <div class="box box1">
        <!-- 标题 -->
        <ul>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ul>
        <!-- 内容 -->
        <ol>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ol>
    </div>

    <!-- tab选项卡2 -->
    <div class="box box2">
        <!-- 标题 -->
        <ul>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ul>
        <!-- 内容 -->
        <ol>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ol>
</body>

<script type="module">
    // 导入
    import Tab from './tab.js'

    const tab1 = new Tab('.box1',{})
    const tab2 = new Tab('.box2',{})
</script>

</html>